package com.framework.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.framework.entity.tran.TranBenefitInfo;
import com.framework.view.TranAmountView;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 功能描述: 分润明细详情
 *
 * @author ck
 * @date 2018/9/6 13:54
 */
public interface BenefitInfoDao extends BaseMapper<TranBenefitInfo> {
	/**
	 * 自营、团队交易列表
	 * @param terminalType
	 * @param dayTime
	 * @param agentId
	 * @param deptId
	 * @param types
	 * @return
	 */
	List<TranAmountView> separatSelfDayList(@Param("terminalType")Integer terminalType, @Param("dayTime")String dayTime, @Param("agentId")Long agentId,@Param("deptId")Long deptId,@Param("types")Integer types);

	/**
	 * 乐刷
	 * @param terminalType
	 * @param dayTime
	 * @param agentId
	 * @param deptId
	 * @param types
	 * @return
	 */
	List<Map<String,Object>> queryLeShuaDayList(@Param("terminalType")Integer terminalType, @Param("dayTime")String dayTime, @Param("agentId")Long agentId,@Param("deptId")Long deptId,@Param("types")Integer types);

	/**
	 * 饼状图走势图
	 * @param agentId
	 * @param deptId
	 * @param monthTime
	 * @param types
	 * @return
	 */
	List<Map<String,Object>> queryTranPancake(@Param("agentId")Long agentId,@Param("deptId")Long deptId,@Param("monthTime")String monthTime,@Param("types")Integer types);

	/**
	 * 柱状图走势
	 * @param agentId
	 * @param beginTime
	 * @param endTime
	 * @return
	 */
	List<Map<String,Object>> queryTranColumnar(@Param("agentId")Long agentId,@Param("beginTime")String beginTime,@Param("endTime")String endTime);

	/**
	 * 查询分润详细
	 * @param params
	 * @return
	 */
    List<Map<String,Object>> queryDetailByBenefitId(Map<String,Object> params);

	/**
	 * 查询分润数量
	 * @param params
	 * @return
	 */
	Integer queryCountByBenefitId(Map<String,Object> params);


}
